import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import axios   from "axios";

Vue.config.productionTip = false
Vue.prototype.$wdz=axios
axios.interceptors.request.use(config=>{
  var token =localStorage.getItem("token")
  //判断是否获取token 只要token有值则返回true
  if (token){
//把token放到请求头中
    config.headers.token=token;
  }
  return config;
})
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
